80105: Function test for xfi:measure-name

Documentation

Tests of function xfi:measure-name($measure as element(xbrli:measure)) as xs:QName

Owners

Name Affiliation Email Start End
Herm Fischer UBMatrix / Mark V Systems fischer@markv.com 23-01-2008 at 00:00:00

References

http://www.xbrl.org/Specification/XF-PWD-2006-12-07.htm#_Toc152670671

Test Case Variations


V-01 Returns pure measure

Documentation

Tests that element returned is unit for specified item.

Inputs

  • schema: unit-test-concepts.xsd
  • instance: unit-test-instance.xml (DTS Discovery starting point) (ID=V01)
  • Function Call: xfi:measure-name( xfi:unit-numerator( //xbrli:unit[@id eq 'unit-inverse-time'] ) )

    (against file V01)

Outputs

  • Result test: $result instance of xs:QName and count( $result ) eq 1 and $result eq QName('http://www.xbrl.org/2003/instance', 'xbrli:pure')

V-02 Returns correct measure divisor unit

Documentation

Tests that elements returned are measures for specified item.

Inputs

  • schema: unit-test-concepts.xsd
  • instance: unit-test-instance.xml (DTS Discovery starting point) (ID=V02)
  • Function Call: xfi:measure-name( xfi:unit-denominator( //xbrli:unit[@id eq 'unit-inverse-time'] ) )

    (against file V02)

Outputs

  • Result test: $result instance of xs:QName and count( $result ) eq 1 and $result eq QName('http://xbrl.org/formula/conformance/example', 'concept:seconds')

V-03 Wrong node to function

Documentation

XPath-defined error for node type incorrect.

Inputs

Outputs

  • Error code: xqt-err:XPTY0004

V-04 A sequence of items as argument

Documentation

XPath-defined error for node type incorrect arity of arguments.

Inputs

  • schema: unit-test-concepts.xsd
  • instance: unit-test-instance.xml (DTS Discovery starting point) (ID=V04)
  • Function Call: xfi:measure-name( xfi:unit-numerator( //xbrli:unit[starts-with(@id,'unit-energy')] ) )

    (against file V04)

Outputs

  • Error code: xqt-err:XPTY0004

V-05 Wrong number of arguments

Documentation

XPath-defined error for node type incorrect number of arguments.

Inputs

Outputs

  • Error code: xqt-err:XPST0017

Revisions

Name On Details
Herm Fischer 23-01-2008 at 00:00:00 Created the test case.
Herm Fischer 05-02-2008 at 00:00:00 Added variation for a tuple.